Optimal. Leaf size=83 \[ \frac{\tanh ^{-1}\left (\frac{\sqrt{c} \cos (e+f x)}{\sqrt{2} \sqrt{c-c \sin (e+f x)}}\right )}{\sqrt{2} a \sqrt{c} f}-\frac{\sec (e+f x) \sqrt{c-c \sin (e+f x)}}{a c f} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.158731, antiderivative size = 83, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 28, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.143, Rules used = {2736, 2675, 2649, 206} \[ \frac{\tanh ^{-1}\left (\frac{\sqrt{c} \cos (e+f x)}{\sqrt{2} \sqrt{c-c \sin (e+f x)}}\right )}{\sqrt{2} a \sqrt{c} f}-\frac{\sec (e+f x) \sqrt{c-c \sin (e+f x)}}{a c f} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2736
Rule 2675
Rule 2649
Rule 206
Rubi steps
\begin{align*} \int \frac{1}{(a+a \sin (e+f x)) \sqrt{c-c \sin (e+f x)}} \, dx &=\frac{\int \sec ^2(e+f x) \sqrt{c-c \sin (e+f x)} \, dx}{a c}\\ &=-\frac{\sec (e+f x) \sqrt{c-c \sin (e+f x)}}{a c f}+\frac{\int \frac{1}{\sqrt{c-c \sin (e+f x)}} \, dx}{2 a}\\ &=-\frac{\sec (e+f x) \sqrt{c-c \sin (e+f x)}}{a c f}-\frac{\operatorname{Subst}\left (\int \frac{1}{2 c-x^2} \, dx,x,-\frac{c \cos (e+f x)}{\sqrt{c-c \sin (e+f x)}}\right )}{a f}\\ &=\frac{\tanh ^{-1}\left (\frac{\sqrt{c} \cos (e+f x)}{\sqrt{2} \sqrt{c-c \sin (e+f x)}}\right )}{\sqrt{2} a \sqrt{c} f}-\frac{\sec (e+f x) \sqrt{c-c \sin (e+f x)}}{a c f}\\ \end{align*}
Mathematica [C] time = 0.31445, size = 97, normalized size = 1.17 \[ -\frac{\cos (e+f x) \left (1+(1+i) \sqrt [4]{-1} \tan ^{-1}\left (\left (\frac{1}{2}+\frac{i}{2}\right ) \sqrt [4]{-1} \left (\tan \left (\frac{1}{4} (e+f x)\right )+1\right )\right ) \left (\sin \left (\frac{1}{2} (e+f x)\right )+\cos \left (\frac{1}{2} (e+f x)\right )\right )\right )}{a f (\sin (e+f x)+1) \sqrt{c-c \sin (e+f x)}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.625, size = 85, normalized size = 1. \begin{align*} -{\frac{-1+\sin \left ( fx+e \right ) }{2\,af\cos \left ( fx+e \right ) } \left ( \sqrt{2}{\it Artanh} \left ({\frac{\sqrt{2}}{2}\sqrt{c \left ( 1+\sin \left ( fx+e \right ) \right ) }{\frac{1}{\sqrt{c}}}} \right ) c\sqrt{c \left ( 1+\sin \left ( fx+e \right ) \right ) }-2\,{c}^{3/2} \right ){c}^{-{\frac{3}{2}}}{\frac{1}{\sqrt{c-c\sin \left ( fx+e \right ) }}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{1}{{\left (a \sin \left (f x + e\right ) + a\right )} \sqrt{-c \sin \left (f x + e\right ) + c}}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 1.09838, size = 425, normalized size = 5.12 \begin{align*} \frac{\sqrt{2} \sqrt{c} \cos \left (f x + e\right ) \log \left (-\frac{\cos \left (f x + e\right )^{2} +{\left (\cos \left (f x + e\right ) - 2\right )} \sin \left (f x + e\right ) + \frac{2 \, \sqrt{2} \sqrt{-c \sin \left (f x + e\right ) + c}{\left (\cos \left (f x + e\right ) + \sin \left (f x + e\right ) + 1\right )}}{\sqrt{c}} + 3 \, \cos \left (f x + e\right ) + 2}{\cos \left (f x + e\right )^{2} +{\left (\cos \left (f x + e\right ) + 2\right )} \sin \left (f x + e\right ) - \cos \left (f x + e\right ) - 2}\right ) - 4 \, \sqrt{-c \sin \left (f x + e\right ) + c}}{4 \, a c f \cos \left (f x + e\right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \frac{\int \frac{1}{\sqrt{- c \sin{\left (e + f x \right )} + c} \sin{\left (e + f x \right )} + \sqrt{- c \sin{\left (e + f x \right )} + c}}\, dx}{a} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.6202, size = 408, normalized size = 4.92 \begin{align*} \frac{\frac{{\left (2 \, \sqrt{2} c \arctan \left (\frac{\sqrt{c}}{\sqrt{-c}}\right ) - 2 \, c \arctan \left (\frac{\sqrt{c}}{\sqrt{-c}}\right ) + \sqrt{-c} \sqrt{c}\right )} \mathrm{sgn}\left (\tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) - 1\right )}{\sqrt{2} a \sqrt{-c} c - 2 \, a \sqrt{-c} c} + \frac{\sqrt{2} \arctan \left (-\frac{\sqrt{2}{\left (\sqrt{c} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) - \sqrt{c \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{2} + c} - \sqrt{c}\right )}}{2 \, \sqrt{-c}}\right )}{a \sqrt{-c} \mathrm{sgn}\left (\tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) - 1\right )} + \frac{2 \,{\left (\sqrt{c} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) - \sqrt{c \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{2} + c} - \sqrt{c}\right )}}{{\left ({\left (\sqrt{c} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) - \sqrt{c \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{2} + c}\right )}^{2} + 2 \,{\left (\sqrt{c} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) - \sqrt{c \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{2} + c}\right )} \sqrt{c} - c\right )} a \mathrm{sgn}\left (\tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) - 1\right )}}{f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]